python exceptions list comprehensions